home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 98
/
Skunkware 98.iso
/
src
/
sgml
/
sgml2latex-format.1.3.tar.Z
/
sgml2latex-format.1.3.tar
/
test
/
test.latin1
< prev
next >
Wrap
Text File
|
1993-03-12
|
12KB
|
463 lines
TThhee qwertz SGML Document Types
(Version 1.1 Reference Manual)
_T_o_m _G_o_r_d_o_n
The qwertz Project
Institute for Applied Information Technology (F3)
German National Research Center
for Computer Science (GMD)
11.. WWhhyy NNoott JJuusstt UUssee LLaaTTeeXX??
The qwertz document types are a set of Standard Generalized
Markup Language (SGML) document type definitions (DTDs) for
articles, reports, books, letters, notes, slides (or over¡
head transparencies), bibliographies, and manual pages.
Except for manual pages, the document types have been heav¡
ily influenced by the LaTeX document types of the same names
Lamport86 , so LaTeX users should feel right at home.
Indeed, we presently translate most qwertz documents into
LaTeX for printing and the LaTeX produced is quite readable
by anyone familiar with LaTeX.
1
22.. TThhee qwertz Document Type Definition
We will be making use of several _p_a_r_a_m_e_t_e_r _e_n_t_i_t_i_e_s in
this DTD:
____________________________________________________________
<!entity % emph
" em | it | bf | sf | sl | tt " >
<!entity % inline
" f | x | %emph; | sq | label | ref |
pageref | cite | ncite " >
____________________________________________________________
22..11.. GGeenneerraall PPuurrppoossee EEnnttiittiieess aanndd EElleemmeennttss
When may it be necessary to use of an entity reference to
produce some character? There are three cases to watch out
for:
SSGGMMLL CCoonnccrreettee SSyynnttaaxx DDeelliimmiitteerrss..
Although the SGML standard allows alternative concrete
syntaxes to be defined, we use the so-called _r_e_f_e_r_e_n_c_e
_c_o_n_c_r_e_t_e _s_y_n_t_a_x in the qwertz document types. ...
SSGGMMLL SShhoorrtt RReeffeerreennccee DDeelliimmiitteerrss..
In SGML document types _s_h_o_r_t _r_e_f_e_r_e_n_c_e _m_a_p_s may be
defined which allow single characters to be inter¡
preted as arbitrarily complex sequences of characters,
including SGML tags and entity references. ...
" # % ' ( ) * + , - : ; = @ [ ] ^ _ { | } ~
For each of these characters, there is an SGML entity
which may be used to generate the ASCII character in the
printed document, listed in table ??. _U_s_u_a_l_l_y_, _i_t _w_i_l_l
_n_o_t _b_e _n_e_c_e_s_s_a_r_y _t_o _u_s_e _t_h_e_s_e _e_n_t_i_t_i_e_s_; _t_h_e _c_h_a_r_a_c_t_e_r _c_a_n
_s_i_m_p_l_y _b_e _t_y_p_e_d _a_n_d _w_i_l_l _b_e _i_n_t_e_r_p_r_e_t_e_d _l_i_t_e_r_a_l_l_y_. How¡
ever, ...
2
General Purpose Entities
TTeeXX SSppeecciiaall CChhaarraacctteerrss..
Ideally, it should be possible to hide the conventions
of the underlying formatting system completely. In
fact, SGML parsers which implement the full ISO stan¡
dard have a feature which makes this possible. ...
22..11..11.. SSppaacciinngg,, DDaasshheess aanndd EElllliippssiiss
There are also three different kinds of dashes: hyphen
which was already mentioned above, is to be used for intra-
word dashes, as in the word "intra-word".1
22..11..22.. FFoorreeiiggnn CChhaarraacctteerrss
There are a large set of entities for other Western European
languages. Altogether, there are entities for almost all of
the foreign language characters in ISO 8859, the Latin 1
character set for Western European languages.2 ...
| | |
AElig ╞ | Aacute ┴ | Acirc ┬ | Ae ─
Ntilde ╤ | Oacute ╙ | Ocirc ╘ | Oe ╓
Ue ▄ | Ugrave ┘ | Uuml ▄ | Yacute ▌
aacute ß | acirc Γ | ae Σ | aelig µ
oe ÷ | ograve ≥ | oslash ° | otilde ⌡
sz ▀ | szlig ▀ | thinsp | tilde ~
times ╫ | uacute · | ucirc √ | ue ⁿ
(Some) General Purpose Characters
22..11..33.. SSeenntteenncceess,, PPaarraaggrraapphhss,, FFoooottnnootteess aanndd EEmmpphhaassiiss
Sentences or phrases within paragraphs can be emphasized
in a number of ways. The em tag is used to choose the
default form of emphasis, which is usually _i_t_a_l_i_c type, but
depends on the style of the background text. If the back¡
ground text is formatted in italics type, as it usually is
in definitions, for example, than emphasized text will be
formatted using a plain, roman typeface. However, various
-----------
1. However, the hyphen entity was not actually
necessary here, as the - character was not being
used in this context as a short reference.
2. Only the four Icelandic characters are miss¡
ing.
3
The qwertz Document Types
forms of emphasis can be explicitly chosen. These include:
bboolldd ffaaccee (bf), _i_t_a_l_i_c_s (it), sans serif (sf), _s_l_a_n_t_e_d (sl),
and typewriter (tt) styles.
Long quotes are formatted in LaTeX by indenting the left
and right margins. For example, Lamport86 (pp. xiii):
The LaTeX document preparation system is a special
version of Donald Knuth's TeX program. TeX is a
sophisticated program designed to produce high-quality
typesetting, especially for mathematical text.
LaTeX represents a balance between functionality
and ease of use. Since I implemented most of it
myself, there was also a continual compromise between
what I wanted to do and what I could do in a reason¡
able amount of time. ...
22..11..44.. LLiissttss
Three types of lists are supported, which differ according
to the type of label used to mark each item in the list.
Use itemize to create a list in which each item is marked
with some symbol such as a dash or bullet. The enum tag is
used to create an enumeration, i.e. a list in which each
item is labelled with a number (or letter) indicating its
rank or position in the list. Finally, use descrip to create
a list in which each item is labelled by some tag of your
own choice. Lists of various types can nested. For example:
╖ A level one item.
╖ Here's level two two
1. A level two item.
2. Here's level three:
a. A level three item.
b. Here's level four:
RReedd..
Is the color of my true love's hair.
BBlluuee..
Is a property of some movies.
4
Lists
YYeellllooww..
Characterizes some forms of journalism.
c. A last level three item
3. A last level two item
╖ A last level one item.
22..11..55.. FFiigguurreess aanndd TTaabblleess
Encapsulated PostScript graphics can be created using a
variety of different editors. If you are using Unix with an
X11-based graphical user-interface, you may want to try
idraw, which stores its documents directly as Encapsulated
PostScript files. Another interesting X11-based drawing pro¡
gram is tgif.
Which would then appear as in figure ??.
An idraw Drawing
22..11..66.. LLiitteerraattee PPrrooggrraammmmiinngg
The original motivation behind the development of these doc¡
ument types was to create an environment for literate pro¡
gramming in an arbitrary programming language similar to
Donald Knuth's WEB system for literate programming in Pascal
Knuth84 . ...
When formatted, spaces and line breaks are preserved:
main ()
{
/* This is the famous hello world program */
printf("hello world\n");
}
5
The qwertz Document Types
22..11..77.. MMaatthheemmaattiiccaall FFoorrmmuullaass
The qwertz document types include elements for describing
mathematical formulas completely within SGML, similar to the
system described in daphne89 . ...
So, for example, example,
sum from {i=1} to {n}x sub {i} = int from {0} to {1}f
was typed as:
<dm>
<sum><ll>i=1<ul>n<opd>x<inf>i</></sum> =
<in><ll>0<ul>1<opd>f</in>
</dm>
$LIST$
6
Lists
TTaabbllee ooff CCoonntteennttss
1. Why Not Just Use LaTeX? . . . . . . . . . . . . . . 1
2. The qwertz Document Type Definition . . . . . . . . . 2
2.1. General Purpose Entities and Elements . . . . . . . 2
2.1.1. Spacing, Dashes and Ellipsis . . . . . . . . . . 3
2.1.2. Foreign Characters . . . . . . . . . . . . . . . 3
2.1.3. Sentences, Paragraphs, Footnotes and Emphasis
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.4. Lists . . . . . . . . . . . . . . . . . . . . . . 4
2.1.5. Figures and Tables . . . . . . . . . . . . . . . 5
2.1.6. Literate Programming . . . . . . . . . . . . . . 5
2.1.7. Mathematical Formulas . . . . . . . . . . . . . . 6
7